﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using CollegeWebsite.Web.Common;

namespace CollegeWebsite.Areas.Administrator.Controllers
{
    public class MenuController : Controller
    {
        // Get the actions in the project assembly to manage dynamic menu
        

        public ActionResult RenderMenu()
        {
            MvcMenu mvcMenu = new MvcMenu();
            Dictionary<string,string> menu = mvcMenu.GetAllActions();
            string temp = "";
            foreach (var m in menu)
            {
                temp += "<br/> - " + m.Value + "<a href=\"" + m.Key + "\">" + m.Value +"---"+ m.Key + "</a>";
            }
            ViewData["menu"] = temp;
            return PartialView();
        }


      

    }
}
